const Router = require("koa-router");
const router = new Router({ prefix: "/resource" });
const { auth, hasAdminPermission } = require("../middleware/auth.middleware");
const {
  getResource,
  createResource,
  updateResource,
  deleteResource,
} = require("../controller/resource/resource.controller");

router.get("/get-resource", getResource);
router.post("/add-resource", auth, hasAdminPermission, createResource);
router.put("/update-resource", auth, hasAdminPermission, updateResource);
router.delete("/delete-resource", auth, hasAdminPermission, deleteResource);
module.exports = router;
